Using local and global resources

All resources are global by default when imported or created into the project. They can be used as values for project items’ resource properties such as texture, material, and so on.

You can make resources local using the Context Resources. Adding a resource to a certain object’s scope adds a resource ID entry to that object’s resource dictionary.

A resource ID is an identifier that abstracts an actual resource from where it is used. A resource dictionary is a collection of resource IDs pointing to actual resources. Resource dictionaries are present by default in all prefab roots but can be added to any object by assigning the resource dictionary property. An object sees all IDs defined in its own dictionary and in dictionaries defined in its ascendant objects. You can assign Resource IDs as values for resource properties and are shown in Kanzi Studio using the syntax RscID → Resource.

Adding a resource dictionary

To add a resource dictionary to an object:

  1. In the Project select the object to which you want to add a resource dictionary.
  2. In the Properties, click Add Properties, and add the Resource Dictionary property.

See also

Using external resource dictionaries

Preloading resource dictionaries

Loading resources in parallel

Resources

Resource management